<!--
 * @Author: Zhouxin 2201_75539691@noreply.gitcode.com
 * @Date: 2024-11-20 20:39:08
 * @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
 * @LastEditTime: 2024-11-20 20:42:01
 * @FilePath: \2024.11.20-day08-数组与字符串\demo3.html
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 将字符串数组用|或其他符号分割 -->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var arr2 = [];
        var arr = [7, 6, 3, 2, 4, 9, 1, 8, 5, 10];
        var arr2 = arr.join("-");
        console.log(arr2);
    </script>
</body>

</html>